/*
* Copyright @2009-2012 www.happyelements.com, all rights reserved.
* Create date: 2012-7-27
* Piggy Dong
* 董文弈
* wenyi.dong@happyelements.com
*/
package com.happyelements.isolib
{
	import flash.display.Sprite;

	/**
	 * @author dongpiggyi
	 */
	public class DefaultTileSprite extends IsoTileSprite
	{
		public function DefaultTileSprite(raw:int, column:int)
		{
			super(raw, column);

			initilizeGraphics();
		}

		private function initilizeGraphics():void
		{
			var tileDisplayObject:Sprite = new Sprite();
			tileDisplayObject.graphics.lineStyle(1, 0x000000);
			tileDisplayObject.graphics.beginFill(0x999999, 0.8);
			tileDisplayObject.graphics.lineTo(-IsoWorld.instance.tileWidth / 2, IsoWorld.instance.tileHeight / 2);
			tileDisplayObject.graphics.lineTo(0, IsoWorld.instance.tileHeight);
			tileDisplayObject.graphics.lineTo(IsoWorld.instance.tileWidth / 2, IsoWorld.instance.tileHeight / 2);
			tileDisplayObject.graphics.lineTo(0, 0);
			tileDisplayObject.graphics.endFill();

			this.displayObject = tileDisplayObject;
		}
	}
}
